package org.mii.safeguard_v1.security.service.mdef;

import java.util.List;

import org.mii.safeguard_v1.security.dao.ResourceDao;
import org.mii.safeguard_v1.security.entity.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * 授权资源服务实现，为系统源管理提供业务模型 
 */
@Service
@Transactional
public class SecurityInterceptorService implements ISecurityInterceptor{
	@Autowired
	private ResourceDao resourceDao;

	@Transactional(readOnly = true)
	public List<Resource> loadResources(String type) {
		List<Resource> resources = resourceDao.findBy("resourceType", type);
		return resources;
	}
}
